package com.seabook.happy.website.services;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

public class UserIdentificationService {
	private static UserService userService = UserServiceFactory.getUserService();
	private static final String ADMIN_USER_EMAIL = "seabook1024@gmail.com";
	
	public static boolean isAdminLoggedIn() {
		User user = userService.getCurrentUser();
		if (user != null && ADMIN_USER_EMAIL.equals(user.getEmail())) {
			return true;
		}
		return false;
	}
	
	public static boolean isSignedIn() {
		User user = userService.getCurrentUser();
		
		if (user != null) {
			return true;
		}
		
		return false;
	}
}
